package com.siashan.unipay4j.core.pay;

import com.siashan.unipay4j.core.PayChannel;
import com.siashan.unipay4j.core.RefundStateEnum;
import lombok.Data;

import java.math.BigDecimal;

/**
 * 退款结果
 *
 * @author siashan
 * @since v1.0.1
 **/
@Data
public class RefundResponse {

    /**
     * 支付渠道
     */
    private PayChannel payChannel;


    /**
     * 退款状态
     */
    private RefundStateEnum refundState;

    /**
     * 是否需要调用查询接口查询退款状态
     */
    private boolean needQuery;

    /**
     * 平台订单号
     */
    private String outTradeNo;

    /**
     * 通道订单号
     */
    private String tradeNo;

    /**
     * 支付通道退款单号
     */
    private String refundNo;

    /**
     * 平台退款单号
     */
    private String outRefundNo;


    /**
     * 退款是否成功
     *
     * @return 是否成功
     */
    public boolean isRefundSuccess(){
        return RefundStateEnum.SUCCESS.equals(refundState);
    }


}
